<?php echo $this->headLink(); ?>
<div class="userview">
    <table class="tableview">
        <tr>
            <td>Họ Tên</td>
            <td>Tài Khoản</td>
            <td>Email</td>
            <td>Địa chỉ</td>
            <td>Trạng thái</td>
            <td>Khóa/Mở tài khoản</td>
        </tr>
        <?php 
        $user=$this->user;
       
        foreach ($user as $iuser) {
             if ($iuser['trangthai']==0) {
            ?>
        <tr>
            <td><?php echo $iuser['hoten']; ?></td>
            <td><?php echo $iuser['username']; ?></td>
            <td><?php echo $iuser['email']; ?></td>
            <td><?php echo $iuser['diachi']; ?></td>
            <td><?php echo $iuser['trangthai']; ?></td>
            <?php 
                if ($iuser['trangthai']==1) {?>
                    <td><a href="<?php echo HOST_PATH; ?>/administrators/lockuser/iduser/<?php echo $iuser['iduser']; ?>">Khóa tài khoản</a></td>
                <?php }  else {
            ?>
            <td><a href="<?php echo HOST_PATH; ?>/administrators/unlockuser/iduser/<?php echo $iuser['iduser']; ?>">Mở tài khoản</a></td>
            <?php 
            }
            ?>
        </tr><?php
            
            }
        }
        ?>
    </table>
</div>
<div class="userview">
    <table class="tableview">
        <tr>
            <td>Tiêu Đề</td>
            <td>Tóm tắt</td>
            <td>iduser</td>
            <td>idtl</td>
            <td>islt</td>
            <td>Khóa/Mở bài viết</td>
        </tr>
        <?php 
        $tin=$this->tin;
       
        foreach ($tin as $itin) {
             if ($itin['anhien']==0) {
            ?>
        <tr>
            <td><?php echo $itin['tieude']; ?></td>
            <td><?php echo $itin['tomtat']; ?></td>
            <td><?php echo $itin['iduser']; ?></td>
            <td><?php echo $itin['idtl']; ?></td>
            <td><?php echo $itin['idlt']; ?></td>
            <?php 
                if ($itin['anhien']==1) {?>
                    <td><a href="<?php echo HOST_PATH; ?>/members/locknew/idtin/<?php echo $iuser['idtin']; ?>">Khóa tài khoản</a></td>
                <?php }  else {
            ?>
            <td><a href="<?php echo HOST_PATH; ?>/members/unlocknew/idtin/<?php echo $iuser['idtin']; ?>">Mở tài khoản</a></td>
            <?php 
            }
            ?>
        </tr><?php
            
            }
        }
        ?>
    </table>
</div>